package org.trc.simulation;

import java.util.ArrayList;

public class STrajectory {
	
	public String carID;
	public ArrayList <STrajectoryPoint> points = new ArrayList <STrajectoryPoint> ();
	public int fromSecond;
	public int toSecond;
	
	public STrajectory(String carID){
		this.carID = carID;
	}
	
	public STrajectory(String cid, int fromSecond, int toSecond){
		this.carID = cid;
		this.fromSecond = fromSecond;
		this.toSecond = toSecond;
	}
    
	public void addTrajectoryPoint(STrajectoryPoint point){
		this.points.add(point);
	}
	
	public void showHistory(){
		System.out.println("Car:" + carID );
		for(int i = 0; i < points.size(); i++){
			System.out.println("#:" + i + " " + points.get(i).upSecond +  ","  +  points.get(i).linkID + "," + points.get(i).offset);
		}
	}

}
